<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Person 数据类型</title>
</head>
<body>
<script>
    function Person(firstName, lastName) {
        this.firstName = firstName;
        this.lastName = lastName;
    }

    Person.prototype.green = function (person) {
        alert('Hello, ' + person.getFullName() + ', I\'m ' + this.getFullName());
    };

    Person.prototype.getFullName = function () {
        return this.firstName + ' ' + this.lastName;
    };
</script>
</body>
</html>